<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="./favicon.ico">
    <title>X.x Cms 管理登陆</title>
    <{*layui样式*}>
	<link rel="stylesheet" href="<{$include_dir}>js/layui/css/layui.css" />
    <link rel="stylesheet" href="<{$template_dir}>admin/css/global.min.css" />
	<link rel="stylesheet" href="<{$template_dir}>admin/css/login.css" />

</head>
<body>

<div id="login-wrap">
	<fieldset class="layui-elem-field" style='    border-color: #9E9E9E;'>
    <legend>登录X.x Cms</legend>
    <div class="logo" style="margin-bottom:-20px">
        <span><img src='./favicon.ico'></span>
        <p></p>
    </div>
	<div class="layui-field-box">
    <form class="layui-form login-form" action="?m=admin&t=loginCheck" method="post" id="login-form">
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="text" name="username"  lay-verify="required" placeholder="管理员账号" autocomplete="off" class="layui-input radius-5">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="password" name="password"  lay-verify="required" placeholder="管理员密码" autocomplete="off" class="layui-input radius-5">
            </div>
        </div>
      
        <div class="layui-form-item">
            <div class="layui-input-block" style="text-align: center;">
                <button class="layui-btn radius-5" lay-submit lay-filter="login">登陆系统</button>
                
                <a id="forgot-password" href="javascript:;" style="margin-left: 20px;">忘记密码？</a>
            </div>
        </div>
        
    </form>

    <form class="layui-form login-form" action="" method="post" id="forgot-password-form" style="display: none;">
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="text" name="account"  lay-verify="required" placeholder="管理员账号" autocomplete="off" class="layui-input radius-5">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="email" name="email"  lay-verify="email" placeholder="管理员邮箱" autocomplete="off" class="layui-input radius-5">
            </div>
        </div>
       
        <div class="layui-form-item">
            <div class="layui-input-block" style="text-align: center;">
                <button id='retrieve-password' class="layui-btn radius-5" lay-submit lay-filter="retrieve-password">找回密码</button>
                <a id="go-back-login" href="javascript:;" style="margin-left: 20px;">返回登陆</a>
            </div>
        </div>
    </form>
    </div>
    </fieldset>
</div>
<!-- 你的HTML代码 -->

<{*layui.js*}>
<script src="<{$include_dir}>js/layui/layui.js"></script>
<script>

layui.use(["layer","form","element","jquery"],function(){
	var layer=layui.layer,lay_form=layui.form(),a=layui.element(),$=layui.jquery;
	$("#forgot-password").on("click",function(){
		$("#login-form").slideToggle();
		$("#forgot-password-form").slideToggle();
		layer.alert('此功能暂做演示用！')
	});
	
	$("#go-back-login").on("click",function(){
		$("#login-form").slideToggle();
		$("#forgot-password-form").slideToggle();
		
	});
	
	lay_form.on("submit(login)",function(e){
		return true
	});
	lay_form.on("submit(retrieve-password)",function(e){
		layer.msg("密码找回邮件已发送到邮箱，请按照邮件提示操作。");
		$(":input","#forgot-password-form").val("");
		return false
	})
});





</script>

</body>
</html>